package com.ubaer.zsycz.httpapi;


import com.ubaer.zsycz.model.BaseModel;
import com.ubaer.zsycz.model.LoginModel;
import com.ubaer.zsycz.model.OrderDetailsModel;
import com.ubaer.zsycz.model.OrderModel;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2018/7/13 0013.
 */

public interface HttpService {

    @FormUrlEncoded
    @POST("api/v2/pertro_china/account/login")
    Observable<BaseModel<LoginModel>> login(@Field("username") String phone,
                                            @Field("password") String password);

    @FormUrlEncoded
    @POST("api/v2/pertro_china/order/list")
    Observable<BaseModel<List<OrderModel>>> getOrderList(@Field("status") String status,
                                                         @Field("keyword") String keyword,
                                                         @Field("page") String page,
                                                         @Field("page_size") String page_size);

    @FormUrlEncoded
    @POST("api/v2/pertro_china/order/deal")
    Observable<BaseModel<List<String>>> ProcessingOrder(@Field("id") String id,
                                                        @Field("status") String status,
                                                        @Field("reason") String reason);

    @FormUrlEncoded
    @POST("api/v2/pertro_china/order/batch_deal")
    Observable<BaseModel<List<String>>> ProcessingOrders(@Field("id") String id);

    @FormUrlEncoded
    @POST("api/v2/pertro_china/order/show")
    Observable<BaseModel<OrderDetailsModel>> getOrderDetails(@Field("id") String id);


}
